<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var mySet = new Set(["value1", "value2", "value3"]);
        //用...操作符,将 Set转 Array
        var myArray = [...mySet];
        String
        // String 转 Set
        var mySet = new Set('hello'); // Set(4) {'h', 'e', 'l', 'o'}
        // 注： Set 中 toString 方法是不能将Set 转换成String
    </script>
</body>
</html>